<?php
class Front_Transection_Generic extends System_Db_Generic  {
// evaluate as php
	public function getpreauthtranlist($params,$userid){
		$db = Zend_Registry :: get("db");
		$cmd_exec = "exec dbo.sp_Preauth_Get_translist ";
		if($params['preauth_id'])
			$cmd_exec .= "'".$params['preauth_id']."'";
		else
			$cmd_exec .= 'NULL';
		$cmd_exec .= ", '".$params['tran_start_date']."', '".$params['tran_end_date']."', '".$userid."', NULL";
		$statement = $db->prepare($cmd_exec);
		$statement->execute();
		$results = $statement->fetchAll();
		return $results;
	}
	public function getpaymenttranlist($params,$userid){
		$db = Zend_Registry :: get("db");
		$cmd_exec = "exec dbo.sp_Payment_Get_translist '".$params['preauth_id']."', '".$params['tran_start_date']."', '".$params['tran_end_date']."', NULL, '".$userid."'";
		$statement = $db->prepare($cmd_exec);
		$statement->execute();
		$results = $statement->fetchAll();
		return $results;
	}
	public function getPaymentDetail($paymentId){
		$db = Zend_Registry :: get("db");
		$cmd_exec = "exec dbo.sp_Payment_Get_translist '".$paymentId."', NULL, NULL, NULL, NULL";
		$statement = $db->prepare($cmd_exec);
		$statement->execute();
		$results = $statement->fetchAll();
		return $results['0'];
	}
}
?>